@use 'sass:math';

.public-event {

  margin-top: -$page-top-margin;

  @mixin aspect-ratio($width, $height) {
    position: relative;

    &::before {
      content: '';
      display: block;
      padding-top: (math.div($height, $width)) * 100%;
      width: 100%;
    }

    > .content {
      bottom: 0;
      left: 0;
      position: absolute;
      right: 0;
      top: 0;
    }

    > img.background {
      bottom: 0;
      left: 0;
      position: absolute;
      right: 0;
      top: 0;
    }
  }

  div.lead {
    &:not(.with) {
      @include aspect-ratio(2, 1);
      left: 0;
      max-height: $event-lead-image-height;
      overflow: hidden;
      position: absolute;
      right: 0;
      width: 100%;

      img.background {
        left: 0;
        position: absolute;
        right: 0;
        width: 100%;
      }

      .content {
        background-color: rgba(0, 0, 0, .7);
        color: #fff;
        left: 0;
        position: absolute;
        right: 0;
        text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
        width: 100%;

        .info {
          align-items: center;
          bottom: 20%;
          position: absolute;

          .logo {
            max-height: 100px;
            max-width: 260px;
          }

          .event {
            font-weight: 300;
          }

          .event.info {
            width: 80%;
          }

          .event.name {
            font-size: 3rem;
            margin: 0;
          }

          .event.time {
            font-size: 1.5rem;
            margin: 0;
          }

          .event.time.ends {
            font-size: 1.25rem;
            margin: 0;
          }

          .event.location {
            font-size: 1.5rem;
            margin: 0;
          }
        }

        @media (max-width: 959px) {

          .info {
            padding: 0 1rem;

            .event.name {
              font-size: 2.15rem;
            }

            .event.time {
              font-size: 1.25rem;
            }

            .event.time.ends {
              font-size: 1.15rem;
             }

            .event.location {
              font-size: 1.25rem;
            }
          }
        }
        @media (max-width: 600px) {
          .logo {
            height: 50px;
            padding-bottom: 4px;
          }
        }
        @media (max-width: 470px) {
          .info {
            bottom: 0 !important;
            padding: 1rem;

            .logo {
              height: 40px;
              padding-bottom: 4px;
            }

            .event-info {
              width: 60%;
            }

            .event.name {
              font-size: 1.4rem;
            }

            .event.time {
              font-size: .85rem;
            }

            .event.time.ends {
              font-size: .85rem;
            }

            .event.location {
              font-size: .75rem;
            }
          }
        }
      }
    }
  }

  div.lead.small {
    &:not(.with) {
      max-height: $event-lead-image-height-minimum;

      .content {

        .info {
          bottom: 20%;
          position: absolute;
        }
      }
    }
  }

  > .content {

    .ui.rail {
      width: 15rem;

      &.right {
        margin-left: 0;
        overflow: hidden;
        padding-left: 0;
      }
    }

    > .info > .event-info {
      min-height: 400px;
      width: 80%;
    }
  }

  .description {
    text-align: justify;
  }

  .speakers {
    margin-top: 10px;
  }

  .sponsor-image {
    margin: 0 auto;
    object-fit: contain;
  }

  .tickets {
    margin-bottom: 20px;
  }

  .session-container {
    margin-top: 15px;
  }
}

.event-map > .g-map {
  height: 100%;
  width: 100%;
}

.event-map > .g-map > .g-map-canvas,
.event-map > iframe.g-map {
  height: 300px;
}

.group-event {
  padding: 0 0 2rem 2rem !important;
}

.logo-event {
  // margin: 10px !important;
  // width: 56px !important;
  height: auto;
}

.public-social-links {
  margin-top: 1.5rem !important;
}

.chat-video-room {
  margin-bottom: 50px !important;
}
